<template>
	<view>
		<navigator url="/pages/owner/components/modify">
			<button type="primary">修改密码</button>
		</navigator>
		<navigator url="/pages/owner/components/modifyPhone">
			<button type="primary">修改手机号</button>
		</navigator>
		<button type="primary">关于我们</button>
		<navigator url="/pages/owner/components/modifyPhone">
			<button type="warn">用户协议</button>
		</navigator>
		<button @click="logout()">退出登录</button>
	</view>
</template>

<script>
	export default {
		created() {
			this.check_user_login()
		},

		methods: {
			check_user_login() {
				this.token = sessionStorage.user_token || localStorage.user_token;
				return this.token;
			},
			logout() {
				localStorage.removeItem("user_token");
				localStorage.removeItem("user_name");
				localStorage.removeItem("user_id");
				localStorage.removeItem("stated");
				sessionStorage.removeItem("user_id");
				sessionStorage.removeItem("user_name");
				sessionStorage.removeItem("user_token");
				sessionStorage.removeItem("stated");
				this.$router.go(-1);
			}
		}
	}
</script>

<style>
	button {
		margin-top: 40upx;
	}

	/* 	.btn-logout {
		margin-top: 100upx;
		width: 80%;
		border-radius: 50upx;
		font-size: 16px;
		color: #fff;
		background: linear-gradient(to right, #365fff, #36bbff);
	}

	.btn-logout-hover {
		background: linear-gradient(to right, #365fdd, #36bbfa);
	} */
</style>
